﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Text;
using System.Windows.Forms;
using DevExpress.XtraEditors;
using Class_KetNoi;
using System.Data.SqlClient;

namespace GiaoDien
{
    public partial class uc_ChiTietsNhanVien : DevExpress.XtraEditors.XtraUserControl
    {
        public uc_ChiTietsNhanVien()
        {
            InitializeComponent();
        }
        KetNoi_NhanVien kn = new KetNoi_NhanVien();
        public void LoadDuLieu()
        {
            
            gridControl1.DataSource = kn.LoadtraCuu_NhanVien();
        }
        private void uc_ChiTietsNhanVien_Load(object sender, EventArgs e)
        {
            kn.connect();
            LoadDuLieu();
        }

        private void btnTimKiem_Click(object sender, EventArgs e)
        {
           gridControl1.DataSource=kn.traCuu_TenNhanVien(txtNoiDung.Text);
        }

        private void btnLamMoi_Click(object sender, EventArgs e)
        {
            LoadDuLieu();
        }

        private void txtNoiDung_MouseClick(object sender, MouseEventArgs e)
        {
            txtNoiDung.SelectAll();
        }
    }
}
